#include "nlohmann/json.hpp"
#include <fstream>
#include <iostream>
using namespace std;
int main(){
    ifstream ifs("test.json");
    char buf[1024] = {0};
    ifs.read(buf,1024);
    //cout << "buf = " << buf << "\n";
    nlohmann::json jsonObject = nlohmann::json::parse(buf); //静态方法parse可以做反序列化
    jsonObject["html"]["head"] = 456.78;
    jsonObject["hello"] = "world";
    cout << "jsonObject = " << jsonObject.dump() << "\n";
    return 0;
}

